#ifndef _PWM__
#define _PWM__

#include "sys.h"

#define X_DUTY  TIM2->CCR1
#define Y_DUTY  TIM2->CCR2
#define Z_DUTY  TIM2->CCR3


void PWM_tim2_Init(u32 arr, u32 psc);
void set_freq(u32 THz, u8 type);

void close_motor(u8 type);
void open_motor(u8 type);



#endif
